package models

import (
	"time"
)

type Discount struct {
	Id int64 `xorm:"oid"`

	Name                      string    `json:"Name" xorm:"not null VARCHAR(200)"`
	Discounttypeid            int       `json:"DiscountTypeId" xorm:"not null INTEGER"`
	Usepercentage             int       `json:"UsePercentage" xorm:"not null BIT(1)"`
	Discountpercentage        string    `json:"DiscountPercentage" xorm:"not null NUMERIC"`
	Discountamount            string    `json:"DiscountAmount" xorm:"not null NUMERIC"`
	Maximumdiscountamount     string    `json:"MaximumDiscountAmount" xorm:"NUMERIC"`
	Startdateutc              time.Time `json:"StartDateUtc" xorm:"DATETIME"`
	Enddateutc                time.Time `json:"EndDateUtc" xorm:"DATETIME"`
	Requirescouponcode        int       `json:"RequiresCouponCode" xorm:"not null BIT(1)"`
	Couponcode                string    `json:"CouponCode" xorm:"VARCHAR(100)"`
	Discountlimitationid      int       `json:"DiscountLimitationId" xorm:"not null INTEGER"`
	Limitationtimes           int       `json:"LimitationTimes" xorm:"not null INTEGER"`
	Maximumdiscountedquantity int       `json:"MaximumDiscountedQuantity" xorm:"INTEGER"`
	Appliedtosubcategories    int       `json:"AppliedToSubCategories" xorm:"not null BIT(1)"`
}
